1. Field of the Invention
The invention relates to dynamic compilers. More specifically, the invention relates to performing data flow analysis of dynamically compiled code through post pass processing.
2. Background
Dynamic compilers, also referred to as just in time (JIT) compilers are used in environments in which it is necessary (or desirable) to compile code at run time. The basic operation of existing dynamic compilers is to read the byte code to be compiled. Once the byte code is read, the dynamic compiler creates an internal representation (IR) of that code. The dynamic compiler may or may not then perform some optimization on the IR. The compiler then generates machine code from the potentially optimized IR. The compiler writes the machine code back to memory (emit the machine code) for immediate execution. For example, Sun Microsystems provides the CDC Hotspot implementation of a simple dynamic compiler in Java™ virtual machines (JVM). In the JVM, the dynamic compiler speeds up execution of programs within the JVM over preexisting interpretive solutions because the machine code created by the compiler (referred to interchangeably herein as “compiled code” or “machine code”) executes faster than interpreting the byte code at run time. However, a simple dynamic compiler like the CDC Hotspot implementation tends to generate inefficient machine code in many contexts.